package com.gemantic.task.util;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;


public class DateUtil extends DateUtils {

    public static final String YYYYMMDD = "yyyyMMdd";
    public static final String YYYY_MM_DD = "yyyy-MM-dd";
    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    public static Date now() {
        return new Date();
    }

    public static Date addMinutes(int amount) {
        return addMinutes(DateUtil.now(), amount);
    }

    public static String format(Date date, String format) {
        return DateFormatUtils.format(date, format);
    }

    public static Long getTimestamp() {
        return now().getTime();
    }
}
